﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Newtonsoft.Json.Linq;

namespace AhCha.Fortunate.ModelsDto.MySQL.WeChatDto
{

    /// <summary>
    /// 微信订阅推送回调（校验）
    /// </summary>
    public class WeChatSubscribeMessageVerify
    {

        /// <summary>
        /// 签名
        /// </summary>
        public string? Signature { get; set; }

        /// <summary>
        /// 时间戳
        /// </summary>
        public string? Timestamp { get; set; }

        /// <summary>
        /// 随机数
        /// </summary>
        public string? Nonce { get; set; }

        /// <summary>
        /// 随机字符串
        /// </summary>
        public string? Echostr { get; set; }

    }

    /// <summary>
    /// 微信用户订阅后回调
    /// </summary>
    public class WeChatSubscribeMessageCallback
    {

        /// <summary>
        /// 小程序账号ID
        /// </summary>
        public string ToUserName { get; set; }

        /// <summary>
        /// 用户openid
        /// </summary>
        public string FromUserName { get; set; }

        /// <summary>
        /// 时间戳
        /// </summary>
        public long CreateTime { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string MsgType { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string Event { get; set; }

        /// <summary>
        /// 若 "List" 只有一个对象，则只返回对象本身；若 "List" 多于一个对象，则返回一个包含所有对象的数组。
        /// </summary>
        public JToken List { get; set; }
    }

    /// <summary>
    /// List 
    /// </summary>
    public class WeChatPush
    {
        /// <summary>
        /// 弹框场景，0代表在小程序页面内
        /// </summary>
        public string PopupScene { get; set; }

        /// <summary>
        /// 订阅结果（accept接收；reject拒收）
        /// </summary>
        public string SubscribeStatusString { get; set; }

        public string MsgID { get; set; }

        /// <summary>
        /// 模板id（一次订阅可能有多个id)
        /// </summary>
        public string TemplateId { get; set; }
    }
}
